﻿
namespace Test30.Engine
{
    public class HasteAction : Action
    {
        public HasteAction(Entity entity, int duration, int boost)
            : base(entity)
        {
            _duration = duration;
            _boost = boost;
        }

        protected override ActionResult OnProcess()
        {
            // set the speed
            Entity.Speed.SetBonus(BonusType.Haste, _boost);

            Entity.Conditions.Haste.SetDuration(_duration);

            return ActionResult.Done;
        }

        private readonly int _duration;
        private readonly int _boost;
    }
}
